    {$CLEO}
    const
        Gate_opened=20@
    end    
0247: load_model 985
038B: load_requested_models      

 
      Gate_opened=1



029B: 6@ = init_object 985 at -4285.4702 -2064.24 11.47 // object (gate_autoR) (3) cleo gate lefit
0453: set_object 6@ XY_rotation 0.0 0.0 angle 270.0 
029B: 7@ = init_object 985 at -4115.1099 -2560.0801 11.53 // gate cleop  right road
0453: set_object 7@ XY_rotation 0.0 0.0 angle 89.989
029B: 8@ = init_object 985 at -4115.1099 -2567.8501 11.53 // cleo left gate road 2
0453: set_object 8@ XY_rotation 0.0 0.0 angle 269.989
029B: 9@ = init_object 985 at -4749.8901 -2181.1499 11.49 // object (gate_autoR) (2) cleo gate open back exit re right
0453: set_object 9@ XY_rotation 0.0 0.0 angle 180.0
029B: 10@ = init_object 985 at -4742.0698 -2181.1499 11.49 // object (gate_autoR) (2) ckl cleo gate left backk door dexit 
0453: set_object 10@ XY_rotation 0.0 0.0 angle 359.995
029B: 11@ = init_object 985 at -4190.75 -2434.6299 11.47 // object (gate_autoR) (2) cle oother side right 
0453: set_object 11@ XY_rotation 0.0 0.0 angle 180.0
029B: 12@ = init_object 985 at -4182.9502 -2434.6299 11.47 // object (gate_autoR) (3)  cleo sideother left
0453: set_object 12@ XY_rotation 0.0 0.0 angle 359.995
029B: 13@ = init_object 985 at -4285.4702 -2056.3999 11.47 // object (gate_autoR) (2) cleo gate right
0453: set_object 13@ XY_rotation 0.0 0.0 angle 90.0
 
0249: release_model 985      
     00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 658.0068 -1866.313 4.4537 radius 15.0 15.0 15.0
      model.Load(#WMYSGRD) 
      model.Load(#COLT45) 
      load_requested_models
 
      :LoadCheck
      gosub @Gate_opened
      wait 0 
      jf @LoadCheck 
      if   
      00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -4114.8071 -2565.4543 10.8466 350.0 350.0 300.0
     //  05FC:   actor $PLAYER_ACTOR in_cube_fll_corner_at -4066.1313 -1691.7473 8.7288  fur_corner_at -4820.1577 -3190.4585 165.4634  angle  92.2869 sphere 0

     //   00A4:   actor $PLAYER_ACTOR sphere 0 in_cube_cornerA   -4088.2214 -1876.6428 4.9415 -4788.1826 -3101.6909 44.2145
      jf @LoadCheck 
      if   
       
      model.Available(#WMYSGRD)
      jf @LoadCheck
      
      1@ = actor.Create(4, #WMYSGRD , -4175.9771, -2426.1116, 10.8684)
      2@ = actor.Create(4, #WMYSGRD , -4196.5332, -2422.7681, 10.8684)
      3@ = actor.Create(4, #WMYSGRD , -4304.5044, -2051.7258, 10.8484)
      4@ = actor.Create(4, #WMYSGRD , -4754.6338, -2200.1543, 10.8684)
      5@ = actor.Create(4, #WMYSGRD , -4737.2915, -2204.4382, 10.8684)
      actor.Angle(1@)=93.3509
      actor.Angle(2@)=270.3221
      actor.Angle(3@)=182.3249
      actor.Angle(4@)=272.607
      actor.Angle(5@)=84.434 
      actor.Health(1@)=500
      actor.Health(2@)=500
      actor.Health(3@)=500
      actor.Health(4@)=500
      actor.Health(5@)=500
      081A: set_actor 1@ weapon_skill_to 3
      081A: set_actor 2@ weapon_skill_to 3
      081A: set_actor 3@ weapon_skill_to 3
      081A: set_actor 4@ weapon_skill_to 3
      081A: set_actor 5@ weapon_skill_to 3
      actor.GiveWeaponAndAmmo(1@,pistol ,99999)
      actor.GiveWeaponAndAmmo(2@,pistol ,99999)
      actor.GiveWeaponAndAmmo(3@,pistol ,99999)
      actor.GiveWeaponAndAmmo(4@,pistol ,99999)
      actor.GiveWeaponAndAmmo(5@,pistol ,99999)
      0446: set_actor 1@ dismemberment_possible 0
      0446: set_actor 2@ dismemberment_possible 0
      0446: set_actor 3@ dismemberment_possible 0
      0446: set_actor 4@ dismemberment_possible 0
      0446: set_actor 5@ dismemberment_possible 0
      077A: set_actor 1@ acquaintance 3 to_actors_pedtype 0 // see ped.dat
      077A: set_actor 1@ acquaintance 3 to_actors_pedtype 1 // see ped.dat
      077A: set_actor 1@ acquaintance 3 to_actors_pedtype 8 // see ped.dat
      077A: set_actor 2@ acquaintance 3 to_actors_pedtype 0 // see ped.dat
      077A: set_actor 2@ acquaintance 3 to_actors_pedtype 1 // see ped.dat
      077A: set_actor 2@ acquaintance 3 to_actors_pedtype 8 // see ped.dat
      077A: set_actor 3@ acquaintance 3 to_actors_pedtype 0 // see ped.dat
      077A: set_actor 3@ acquaintance 3 to_actors_pedtype 1 // see ped.dat
      077A: set_actor 3@ acquaintance 3 to_actors_pedtype 8 // see ped.dat
      077A: set_actor 4@ acquaintance 3 to_actors_pedtype 0 // see ped.dat
      077A: set_actor 4@ acquaintance 3 to_actors_pedtype 1 // see ped.dat
      077A: set_actor 4@ acquaintance 3 to_actors_pedtype 8 // see ped.dat
      077A: set_actor 5@ acquaintance 3 to_actors_pedtype 0 // see ped.dat
      077A: set_actor 5@ acquaintance 3 to_actors_pedtype 1 // see ped.dat
      077A: set_actor 5@ acquaintance 3 to_actors_pedtype 8 // see ped.dat
      0638: AS_actor 1@ stay_put 1
      0638: AS_actor 2@ stay_put 1
      0638: AS_actor 3@ stay_put 1
      0638: AS_actor 4@ stay_put 1
      0638: AS_actor 5@ stay_put 1 
      model.Destroy(#WMYSGRD) 
      model.Destroy(#COLT45) 
      32@=0
      wait 1000
      :InTheArea
      wait 0
        gosub @Gate_opened
          if  
         //  05FC:   actor $PLAYER_ACTOR in_cube_fll_corner_at -4066.1313 -1691.7473 8.7288  fur_corner_at -4820.1577 -3190.4585 165.4634  angle  92.2869 sphere 0
            80FE:  not actor $PLAYER_ACTOR sphere 0 in_sphere -4114.8071 -2565.4543 10.8466 350.0 350.0 300.0
          // 80A4: not  actor $PLAYER_ACTOR sphere 0 in_cube_cornerA   -4088.2214 -1876.6428 4.9415 -4788.1826 -3101.6909 44.2145
          then
              actor.DestroyInstantly(1@)
              actor.DestroyInstantly(2@)
              actor.DestroyInstantly(3@)
              actor.DestroyInstantly(4@)
              actor.DestroyInstantly(5@)
              wait 1000
              jump @LoadCheck
          end


          
          
      jump @InTheArea
   :Gate_opened
   
          if or
             00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  -4744.6733 -2200.7729 10.82 radius 9.0 9.0 9.0
             00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere  -4187.3887 -2425.7571 10.82 radius 9.0 9.0 9.0
             00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -4304.0635 -2060.8125 10.82  radius 9.0 9.0 9.0
             00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -4114.8071 -2565.4543 10.8466  radius 9.0 9.0 9.0

          then
              if 044B:   actor $PLAYER_ACTOR on_foot
              then
              show_text_highpriority "Press Y to request them to open the gate" 5
                  if 00E1:   player 0 pressed_key 11
                  then
                  Gate_opened = 1 
                  32@=0                   
                  end
              else

              end
          end   
          if 32@ > 5000
          then
             32@ = 0 
             Gate_opened=0
          end   
      if Gate_opened==0    
      then
            
      //Opened 
      034E: move_object 6@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 7@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 8@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 9@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 10@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 11@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 12@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 13@ to -4115.1099 -2560.0801 11.53  speed 0.0 0.0 0.03 collision_check 0 
      else
      //Closed
      034E: move_object 6@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 7@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 8@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 9@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 10@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 11@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 12@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0
      034E: move_object 13@ to -4194.1216 -2417.7358 -2.9114  speed 0.0 0.0 0.03 collision_check 0 
      end   
   return                                